feat: User feedback and crash reporting system (#113)#158
feat: User feedback and crash reporting system (#113)#158deucebucket merged 5 commits intodevelopfrom
Conversation
- Add library_manager/feedback.py: session action logger (circular buffer), path/data sanitizer, local feedback storage (feedback.json) - Add POST /api/feedback route for submitting bug reports, corrections, feature requests with optional session log and system info - Add floating feedback button + modal to base.html matching existing theme system (works with both default and skaldleita themes) - Add Flask error handlers (500, 404) that log to session buffer - Hook session logging into key routes: scan, process, apply_fix, reject_fix, worker start/stop, apply_all - Feedback stored locally, structured for future Skaldleita API forwarding
- feedback.py: Add best-effort proxy to Skaldleita feedback API with signed request headers. Local storage remains primary. Add Docker detection to system info. - base.html: Add error feedback modal that auto-appears on 500 errors (via fetch interceptor detecting suggest_feedback flag). Users can describe what they were doing + send crash report.
🔍 Vibe Check ReviewContextPR #158 adds a user feedback system with session logging, crash detection, and UI for submitting feedback with sanitized data. Codebase Patterns I Verified
✅ Good
🚨 Issues Found
📋 Scope Verification
Scope Status: SCOPE_PARTIAL What's Missing:
📝 Documentation Check
🎯 VerdictREQUEST_CHANGES Required fixes:
Recommended (not blocking):
Security Note: No critical vulnerabilities found. Sanitization works but could be more comprehensive. |
🔍 Vibe Check ReviewContextPR #158 adds a user feedback system with floating UI button, session logging, crash auto-prompt, and integration with Skaldleita API. Codebase Patterns I VerifiedError Handling:
Type Hints:
Timeouts:
Logging:
Security (XSS):
✅ Good
🚨 Issues Found
CRITICAL ISSUE DETAILS - Import Inside Function: Lines 347-349 in feedback.py: def _proxy_to_skaldleita(entry):
"""Forward feedback to Skaldleita API. Best-effort, never raises."""
try:
from .signing import generate_signature
from .providers.bookdb import get_lm_versionWhy this is critical: If Pattern in codebase: app.py has several import-fallback patterns (lines 119, 132, 144) that catch 📋 Scope Verification
Scope Status: SCOPE_OK All requirements met:
📝 Documentation Check
🎯 VerdictREQUEST_CHANGES Required fixes before merge:
Optional improvements:
The implementation is solid overall with good security practices (sanitization, XSS protection, thread safety), but the import-inside-function pattern and broad exception handler need fixing before this can ship. |
🔍 Vibe Check ReviewContextPR #158 implements a user feedback and crash reporting system with a floating feedback button, session activity logging, crash auto-prompts, path/API key sanitization, and forwarding to Skaldleita API with local fallback storage. Codebase Patterns I VerifiedChecked existing patterns before judging:
✅ Good
🚨 Issues Found
No issues found. Code is production-ready. 📋 Scope Verification
Scope Status: SCOPE_OK All requirements met:
📝 Documentation Check
🎯 VerdictAPPROVE This PR is well-crafted and production-ready: Security: Comprehensive sanitization protects user privacy (paths, IPs, API keys all redacted) Robustness: Thread-safe logging, specific exception handling, timeouts on network calls, bounded storage, local-first with best-effort proxying Code Quality: Matches project patterns, clean separation of concerns, proper error handling throughout Scope: Fully addresses Issue #113 with all requested features No changes required. Ship it. |
🔍 Vibe Check ReviewContextPR #158 adds a comprehensive user feedback and crash reporting system with session logging, data sanitization, local storage, and best-effort proxying to Skaldleita API. Codebase Patterns I VerifiedError Handling: Project uses specific exception types (e.g., Type Hints: Used consistently in library_manager modules (verified in Imports: Standard library imports, then third-party (requests), then local imports with Requests Pattern: Uses JavaScript Error Handling: Existing code uses Logging: Uses module-level ✅ Good
🚨 Issues Found
📋 Scope Verification
Key Requirements Met:
Scope Status: SCOPE_OK 📝 Documentation Check
🎯 VerdictREQUEST_CHANGES Critical fixes required:
Recommended improvements: The implementation is solid and well-architected, but the silent JSON failure handling and missing input validation on |
Summary
library_manager/feedback.pymodule with session action logger (circular buffer of 50 actions), path/data sanitizer, and local feedback storage (feedback.json, capped at 200 entries)POST /api/feedbackroute accepting category, description, optional session log and system infobase.html(themed, works with all color schemes)Test plan
feedback.jsontest-naming-issues.py(281/281 pass)ruff check --select=F821clean